﻿<%@ Page language="c#" Codebehind="emaillist.aspx.cs" validateRequest="false" AutoEventWireup="true" Inherits="sow.emaillist" %>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN" >
<HTML>
  <HEAD>
		<title>forumMain</title>
		<meta content="False" name="vs_snapToGrid">
		<meta content="Microsoft Visual Studio .NET 7.1" name="GENERATOR">
		<LINK href="../springofwater.css" type="text/css" rel="stylesheet">
		<meta content="C#" name="CODE_LANGUAGE">
		<meta content="JavaScript" name="vs_defaultClientScript">
		<meta content="http://schemas.microsoft.com/intellisense/ie5" name="vs_targetSchema">
		<script language="javascript">
			function isValidEmail(sText)
			{
				var reEmail = /^(?:\w+\.?)*\w+@(?:\w+\.?)*\w+$/;
				return reEmail.test(sText);
			}
			function checkEmailStr()
			{
						    
			   	var emailstr=new String(TextBox_EmailAddress.Text.Trim());
				
				if(emailstr=="")
				{
					alert("请输入电子邮件地址！");
					return false;
				}
				var arrEmail= new Array;
				arrEmail=emailstr.split(",");
				var errEmail="";
				for (var i=0; i<arrEmail.length; i++)
				{
					if(!isValidEmail(arrEmail[i]))
					{
						errEmail+=arrEmail[i]+"\n";
					}
				}
				if(errEmail!="")
				{
					alert("电子邮件地址:\n" + errEmail + "\n有误。\n\n请输入电子邮件地址！");
					return false;
				}
				return true;
			}
		</script>
</HEAD>
	<body>
		<div align="center">
			<div align="center">
				<table id="table812" width="80%" border="0">
					<tr>
						<td align="center">
							<%Server.Execute("header.aspx");%>
						</td>
					</tr>
				</table>
				<table cellSpacing="0" cellPadding="0" width="770" align="center" border="0">
					<tr>
						<td><!--insert menu here-->
							<ul style="PADDING-RIGHT: 0px; PADDING-LEFT: 0px; FLOAT: left; PADDING-BOTTOM: 0px; MARGIN: 0px; WIDTH: 100%; PADDING-TOP: 0px; FONT-FAMILY: SimSun; LIST-STYLE-TYPE: none; BACKGROUND-COLOR: white">
								<li style="DISPLAY: inline">
									<A class="menu" href="index.aspx">泉源首页</A>
								<li style="DISPLAY: inline">
									<A class="menu" href="forumsStart.aspx">泉源论坛</A>
								<li style="DISPLAY: inline">
									<A class="menu" href="bloggermain.aspx">泉源博客</A>
								<li style="DISPLAY: inline">
									<A class="empty" href=""></A>
								<li style="DISPLAY: inline">
									<A class="menu" href="dengji.aspx">注册登记</A>
								<li style="DISPLAY: inline">
									<A class="menu" href="women.aspx">关于我们</A>
								<li style="DISPLAY: inline">
									<A class="menu" href="mailto:contact@springofwater.net">联络我们</A>
								</li>
							</ul>
						</td>
					</tr>
				</table>
			</div>
			<form id="Form1" method="post" runat="server">
				<div align="center">
					<table style="WIDTH: 751px; HEIGHT: 121px" borderColor="#6699cc" cellSpacing="0" cellPadding="0"
						align="center" bgColor="whitesmoke" border="1">
						<tr>
							<td>
								<TABLE id="Table1" cellSpacing="0" cellPadding="0" width="777" bgColor="whitesmoke" border="0">
									<TR>
										<TD style="HEIGHT: 30px" align="right" borderColor="blue" colSpan="2" rowSpan="1"><font size="2">新电子邮件：</font>
											<asp:TextBox id="TextBox_EmailAddress" runat="server" Width="524px" OnTextChanged="TextBox_EmailAddress_TextChanged"></asp:TextBox>
											<asp:Button id="Button_AddAddress" runat="server" Text="添加到下面邮件列表中" Width="150px" OnClick="Button_AddAddress_Click1"></asp:Button></TD>
									</TR>
									<tr>
										<td bgColor="#6699cc" colSpan="2" height="14" style="HEIGHT: 14px"><FONT color="lightgoldenrodyellow" size="2">请先选择或添加邮件列表，再将新电子邮件添加到列表中(多个电子邮件用逗号隔开)。</FONT></td>
									</tr>
									<TR>
										<TD width="30%" style="HEIGHT: 25px" vAlign="top" align="center"><P><asp:literal id="Literal1" Runat="server"></asp:literal></P>
											<P>
												<asp:TextBox id="TextBox1" runat="server" Width="85px"></asp:TextBox>&nbsp;<asp:button id="Button_AddList" Runat="server" Text="添加新列表" OnClick="Button_AddList_Click1"></asp:button></P>
										</TD>
										<td vAlign="top" width="70%">
											<table width="100%" border="0" align="center">
												<tr>
													<td height="25"><asp:label id="Label_Title" Runat="server" ForeColor="#0000C0" Font-Bold="True"></asp:label>&nbsp;&nbsp;<asp:button id="Button_DeleteList" Runat="server" Text="删除此列表" Visible="False" OnClick="Button_DeleteList_Click1"></asp:button>
														<asp:button id="Button_EditList" Runat="server" Text="编  辑" Visible="False" OnClick="Button_EditList_Click"></asp:button>
													</td>
												</tr>
												<tr>
													<td height="25">
														<asp:datagrid id="DataGrid_List" runat="server" Width="100%" AutoGenerateColumns="False" CellPadding="2"
															GridLines="None" HorizontalAlign="Center" AllowSorting="True" BorderWidth="1px" CellSpacing="1"
															BorderColor="Black" BackColor="White" ForeColor="#336699" ShowHeader="False">
															<ItemStyle Font-Size="12px" Height="26px" BorderStyle="None"></ItemStyle>
															<HeaderStyle Font-Size="12px" Height="23px" ForeColor="#003399" BackColor="Lavender"></HeaderStyle>
															<Columns>
																<asp:BoundColumn DataField="EmailAddress" SortExpression="EmailAddress" HeaderText="邮箱地址">
																	<HeaderStyle BorderWidth="1px" BorderStyle="Solid" BorderColor="Black" Width="400px"></HeaderStyle>
																</asp:BoundColumn>
																<asp:TemplateColumn HeaderText="删除">
																	<HeaderStyle HorizontalAlign="Center" BorderWidth="1px" BorderStyle="Solid" BorderColor="Black"
																		Width="60px"></HeaderStyle>
																	<ItemStyle HorizontalAlign="Center" Width="60px"></ItemStyle>
																	<ItemTemplate>
																		<asp:Button id="Button_Delete" runat="server" CssClass="A" Width="60px" Text="删除"></asp:Button>
																		<asp:Label id="Label_ID" runat="server" Visible="False"></asp:Label>
																	</ItemTemplate>
																</asp:TemplateColumn>
															</Columns>
															<PagerStyle Height="30px" HorizontalAlign="Center" Mode="NumericPages"></PagerStyle>
														</asp:datagrid>
													</td>
												</tr>
											</table>
										</td>
									</TR>
								</TABLE>
							</td>
						</tr>
					</table>
				</div>
			</form>
			<DIV align="center">
				<table id="table81" width="80%" border="0">
					<tr>
						<td align="center">
							<% Server.Execute("tail.aspx");%>
						</td>
					</tr>
				</table>
			</DIV>
		</div>
	</body>
</HTML>
